import './index.scss'
// import { dealsDer } from '../../../utils/sendRequst'
import React, { useEffect } from 'react';
import { observable  } from 'mobx';
const Student = () => {
 
    const getStu = () => {
        dealsDer().then(res => {
            let a=0;
            let b=0;
            const c = observable.array([]);
            let e=0;
            console.log(res);
            for (let i = 0; i < res.data.length; i++) {
                //这是下单数
                 a += res.data[i].orNum
                 //这是订单总金额
                 b+=res.data[i].orPrice
                 //这是下单人数
                 c.push(res.data[i].orBuyerId)
                 //这是订单数
                 if(res.data[i].orState==4){
                       e++
                 }
                 

            }
            const d=new Set(c)
            //这是下单人数
            console.log(d.size);
            
        })

    };
    useEffect(() => {
        getStu()
    }, [])

    return (
        <div>
            <div className="p-hea">
                <p >交易数据</p>
            </div>
            <p className="p-heb">交易概览</p>
            <div className="p-hec">
                <div>
                    <p className="p-hed">浏览人数</p>
                    <p className="p-hee">2000</p>
                </div>
                <div>
                    <p className="p-hed">下单人数</p>
                    <p className="p-hee">2000</p>
                </div>
                <div>
                    <p className="p-hed">订单数</p>
                    <p className="p-hee">2000</p>
                </div>
                <div>
                    <p className="p-hed">下单件数</p>
                    <p className="p-hee">2000</p>
                </div>
                <div>
                    <p className="p-hed">有效订单数</p>
                    <p className="p-hee">2000</p>
                </div>
                <div>
                    <p className="p-hed">下单金额</p>
                    <p className="p-hee">2000</p>
                </div>
               
            </div>
            <div className="p-hel">
                <div>
                    <p className="p-hed">退款金额</p>
                    <p className="p-hee">2000</p>
                </div>
                <div>
                    <p className="p-hed">付款人数</p>
                    <p className="p-hee">2000</p>
                </div>
                <div>
                    <p className="p-hed">付款订单数</p>
                    <p className="p-hee">2000</p>
                </div>
                <div>
                    <p className="p-hed">付款件数</p>
                    <p className="p-hee">2000</p>
                </div>
                <div>
                    <p className="p-hed">付款件数</p>
                    <p className="p-hee">2000</p>
                </div>
                <div>
                    <p className="p-hed">客单价</p>
                    <p className="p-hee">2000</p>
                </div>
            </div>



        </div>
    );
}

export default Student;